package com.hs.android.fortress.calculators;

import java.util.ArrayList;
import java.util.List;

import com.hs.android.fortress.R;


public class AngleHandler {

	private static AngleHandler instance = new AngleHandler();
	
	private int currentMode = -1;
	
	private List<AngleStrategy> modes;
	
	private AngleHandler(){
		modes = new ArrayList<AngleStrategy>();
		setModes();
	}

	public static AngleHandler getInstance() {
		return instance;
	}
	
	private void setModes(){
		modes.add(new horizontalityBaseMode(R.drawable.btn_modechange_horizontal));
		modes.add(new verticalityBaseMode(R.drawable.btn_modechange_vertical));
	}
	
	public AngleStrategy chageMode(){
		currentMode = (currentMode+1)%modes.size();
		return modes.get(currentMode);
	}
	
}
